import Request from '../static/network/request.js';

export function listComment(params: {
	page?: number
	limit?: number
	id: number
	type: number
}):any {
	return Request.get({
		api: '/api/posts/comment/lst',
		params
	})
}

export function saveComment(data: {
	pid: number,
	buid?: number,
	cid?: number,
	rid?: number,
	content: string,
	addr: string
}):any {
	return Request.post({
		api: '/api/apply/save',
		data
	})
}

export function loadComment(params: {
	page?: number
	limit?: number
	cid?: number
}): any{
	return Request.get({
		api: '/api/posts/comment/more_lst',
		params
	})
}

export function removeComment(params: {
	id?: number
}): any{
	return Request.get({
		api: '/api/apply/delete',
		params
	})
}
